﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Benefit.Service.Sys
{
    /// <summary>
    /// 公司信息
    /// </summary>
    public class ServiceCompany : Benefit.Interface.Sys.ICompany
    {
        Benefit.DB.DBManager db = null;
        public ServiceCompany(Benefit.DB.DBManager db)
        {
            this.db = db;
        }

        public bool HasInited()
        {
            bool inited = false;
            var query = db.Company.Count();
            if (query > 0)
            {
                inited = true;
            }
            return inited;
        }


        public Models.Sys.Company GetCompany()
        {
            var query = db.Company.FirstOrDefault();
            return query;
        }
    }
}
